#if MSC_VER >=1000
    #pragma execution_character_set("UTF-8")
#endif

#include "tlyric.h"


#include<QTextStream>
#include<QJsonDocument>
#include<QJsonObject>
#include<QJsonParseError>
#include<QDebug>

Tlyric::Tlyric()
{

}

Tlyric Tlyric::parseFromJSON(QJsonObject jsonObject)
{

    Tlyric tlyric;

    auto sversion = jsonObject.value("version");
    auto slyric = jsonObject.value("lyric");

    tlyric.setVersion(sversion.toInt());
    tlyric.setLyric(slyric.toString());



    return tlyric;

}

void Tlyric::setVersion(int version)
{
    this->version = version;

}

void Tlyric::setLyric(QString lyric)
{
   // qDebug()<<__FUNCTION__<<"lyric= "<<lyric;
    this->lyric = lyric;
}

int Tlyric::getVersion()
{
    return this->version;

}

QString Tlyric::getLyric()
{
    return this->lyric;
}
